class Person {
  constructor (sex = 'male', age = '26') {
    this.sex = sex
    this.age = age
  }
  // 设置一个静态方法
  static getName() {
    return 'lee'
  }
  getInfo() {
    return this.sex + ', ' + this.age
  }
}

var p = new Person()
console.log(Person)
console.log(p.__proto__ === Person.prototype) // true
console.log(Person.prototype.constructor === Person) // true
console.log(Person.getName()) // lee

class Student extends Person {
  constructor () {
    super()
  }
  static getName() {
    return super.getName() + ' can'
  }
}
console.log(Student.getName()) // lee can